#pragma once

#include <boost/asio.hpp>

struct TelnetConfig
{
    uint16_t server_port = 2500;
    std::string username;
    std::string passwd;
};

class TelnetSession;
class TelnetServerImpl
{
public:
    TelnetServerImpl(boost::asio::io_service& io_service, const TelnetConfig& cfg);
    void start_accept();

private:
    void handle_accept(TelnetSession* new_session, const boost::system::error_code& error);
    boost::asio::io_service& _io_service;
    boost::asio::ip::tcp::acceptor _acceptor;
};
